import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { MdlModule } from '@angular-mdl/core';
import { CommonService } from '../common/service/common.service';
import { TableModule } from 'primeng/table';
import { TabMenuModule, TreeModule, TreeTableModule, SplitButtonModule, BreadcrumbModule, ToolbarModule, InputTextModule,
          DialogModule, GalleriaModule, InputTextareaModule, PanelModule, ButtonModule, AutoCompleteModule, CalendarModule,
          ToggleButtonModule, CarouselModule, TabViewModule, PanelMenuModule, SharedModule, DataScrollerModule, EditorModule,
          ConfirmDialogModule, ConfirmationService, DropdownModule, DragDropModule, TooltipModule, RadioButtonModule,
          DataGridModule, GrowlModule, OrganizationChartModule, InputSwitchModule, CardModule, DataListModule, ListboxModule,
          MenubarModule, PaginatorModule, RatingModule } from 'primeng/primeng';
import { OrderListModule } from 'primeng/orderlist';
import { FieldsetModule } from 'primeng/fieldset';
import { ToastModule } from 'primeng/toast';
import { FileUploadModule } from 'primeng/fileupload';
import { MultiSelectModule } from 'primeng/multiselect';
import { QkSharedModule } from '../common/module/qkshare.module';
import {NoticeComponent} from './notice.component';
import {noticeRoutes} from './notice.routes';
import {ReceiveListComponent} from './receive-list/receive-list.component';
import { NoticeEditComponent } from './notice-edit/notice-edit.component';
import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';
import { NzUploadModule } from 'ng-zorro-antd/upload';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { IconDefinition } from '@ant-design/icons-angular';
import { NZ_ICON_DEFAULT_TWOTONE_COLOR, NZ_ICONS } from 'ng-zorro-antd';
import { PlusOutline } from '@ant-design/icons-angular/icons';
import {PublishListComponent} from './publish-list/publish-list.component';

// 单独导入plus图片
const icons: IconDefinition[] = [PlusOutline];
@NgModule({
    imports: [
        QkSharedModule,
        MenubarModule,
        FormsModule,
        ReactiveFormsModule,
        CommonModule,
        MdlModule,
        TreeModule,
        TabMenuModule,
        SplitButtonModule,
        BreadcrumbModule,
        ToolbarModule,
        PanelModule,
        ButtonModule,
        AutoCompleteModule,
        InputTextModule,
        InputTextareaModule,
        TabViewModule,
        CarouselModule,
        PanelMenuModule,
        SharedModule,
        ConfirmDialogModule,
        DialogModule,
        CalendarModule,
        DropdownModule,
        DragDropModule,
        TooltipModule,
        GalleriaModule,
        DataScrollerModule,
        EditorModule,
        RadioButtonModule,
        DataGridModule,
        GrowlModule,
        TreeTableModule,
        InputSwitchModule,
        OrganizationChartModule,
        TableModule,
        CardModule,
        DataListModule,
        ListboxModule,
        ToggleButtonModule,
        MultiSelectModule,
        FileUploadModule,
        ToastModule,
        FieldsetModule,
        OrderListModule,
        PaginatorModule,
        RatingModule,
        NgZorroAntdModule,
        NzUploadModule,
        NzIconModule,
        RouterModule.forChild(noticeRoutes),
    ],
    declarations: [
        NoticeComponent,
        ReceiveListComponent,
        NoticeEditComponent,
        PublishListComponent,
    ],
    entryComponents: [

    ],
    exports: [],
    providers: [
        CommonService,
        ConfirmationService,
        { provide: NZ_I18N, useValue: zh_CN },
        { provide: NZ_ICON_DEFAULT_TWOTONE_COLOR, useValue: '#00ff00' }, // 不提供的话，即为 Ant Design 的主题蓝色
        { provide: NZ_ICONS, useValue: icons }
    ]
})
export class NoticeModule {
}
